﻿module Logger

let private warningStream = System.Console.Error
let private errorStream = System.Console.Error

let concat4 (s1:string) (s2:string) (s3:string) (s4:string) = 
    string ((new System.Text.StringBuilder(s1, s1.Length + s2.Length + s3.Length + s4.Length)).Append(s2).Append(s3).Append(s4))

let Warning (typ:string) (message:string) =
    warningStream.WriteLine(concat4 "Warning " typ ": " message)

let Error (typ:string) (message:string) =
    errorStream.WriteLine(concat4 "Error " typ ": " message)